/**
 *
 */
package org.examcity.springmvc.controllers;

import org.examcity.domain.SubjectRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class SubjectController {

	@Autowired
	private SubjectRepository subjectRepository;

	@RequestMapping("/subject/list.do")
	public String list(ModelMap model) {
		model.addAttribute("subjectList", subjectRepository.findAll());
		return "/subject/list";
	}

}
